Fix watchdog POST for lwmon5
authorSascha Laue <[email protected]>
Tue, 1 Apr 2008 13:13:03 +0000 (15:13 +0200)
committerWolfgang Denk <[email protected]>
Mon, 28 Apr 2008 19:15:46 +0000 (21:15 +0200)
If the hardware watchdog detects a voltage error, the watchdog sets
GPIO62 to low. The watchdog POST has to detect this low level.

Signed-off-by: Sascha Laue <[email protected]>
Signed-off-by: Wolfgang Denk <[email protected]>
post/board/lwmon5/watchdog.c

index 16c01bee4383af554fdcdb6eb28da75adf709432..1246278a58195484f28f06fb09cd6863f6bfe00f 100644 (file)
@@ -52,8 +52,9 @@ static void watchdog_magic_write(uint value)
 
 int sysmon1_post_test(int flags)
 {
-       if (gpio_read_in_bit(CFG_GPIO_SYSMON_STATUS)) {
-               /* 3.1. GPIO62 is low
+       if (gpio_read_in_bit(CFG_GPIO_SYSMON_STATUS) == 0) {
+               /*
+                * 3.1. GPIO62 is low
                 * Assuming system voltage failure.
                 */
                post_log("Abnormal voltage detected (GPIO62)\n");